<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>系统登录</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
    </head>
${validate_js }
<script type="text/javascript">
$(function(){
	$("#login").validate({
		submitHandler:function(form){
			alert("提交事件");
	        form.submit();
	    },
		rules:{
		userName:{required:true},
		password:{required:true}
		},
		messages:{
		userName:{required:'请输入用户名'},
		password:{required:'请输入密码'}
		}
	});
	
})
</script>
    <body>
        <div class="page-container">
            <h1>登录</h1>
            <form id="login" action="${contextPath}/login/doLogin" method="post">
                <input type="text" name="userName" id="userName"  placeholder="用户名" /><br />
				<input type="password" name="password" placeholder="密码" />
				<input type="submit" name="submit"  value="提交" />
            </form>
        </div>
    </body>
</html>

